package com.whutosa.template.server.model;

import org.springframework.web.socket.TextMessage;

/**
 * Created by 19110 on 2016/9/28.
 */
public class ChatMsg {
    private String uid;
    private String username;
    private String msg;

    public ChatMsg() {
    }

    public ChatMsg(User user, TextMessage message) {
        uid = user.getUid();
        username = user.getName();
        msg = message.getPayload();
    }


    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
